<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Purple Admin</title>
  <link rel="stylesheet" href="vendors/iconfonts/mdi/css/materialdesignicons.min.css">
  <link rel="stylesheet" href="vendors/css/vendor.bundle.base.css">
  <link rel="stylesheet" href="css/style.css">
  <link rel="shortcut icon" href="images/favicon.png" />
</head>

<body>
  <div class="container-scroller">
    <nav class="navbar default-layout-navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
      <div class="text-center navbar-brand-wrapper d-flex align-items-center justify-content-center">
             <a class="navbar-brand brand-logo" href="bussiness/toBussiness"><img src="images/logo.svg" alt="logo"/></a>    <!-- 主页index地址 -->
        <a class="navbar-brand brand-logo-mini" href="bussiness/toBussiness"><img src="images/logo-mini.svg" alt="logo"/></a>    <!-- 主页index地址 -->
      </div>
      <div class="navbar-menu-wrapper d-flex align-items-stretch">
        <ul class="navbar-nav navbar-nav-right">
          <li class="nav-item nav-profile dropdown">
            <a class="nav-link dropdown-toggle" id="profileDropdown" href="#" data-toggle="dropdown" aria-expanded="false">
              <div class="nav-profile-img">
                <img src="images/faces/face1.jpg" alt="image">
                <span class="availability-status online"></span>             
              </div>
              <div class="nav-profile-text">
                <p class="mb-1 text-black">${sessionScope.loginBussiness.bussinessName }</p>   <!--用户名  -->
              </div>
            </a>
            <div class="dropdown-menu navbar-dropdown" aria-labelledby="profileDropdown">
              <div class="dropdown-divider"></div>
              <a class="dropdown-item" href="login/loginOut">         <!-- 退出地址 -->
                <i class="mdi mdi-logout mr-2 text-primary"></i>
                Signout
              </a>
            </div>
          </li>
          <li class="nav-item d-none d-lg-block full-screen-link">
            <a class="nav-link">
              <i class="mdi mdi-fullscreen" id="fullscreen-button"></i>
            </a>
          </li>
        </ul>
        <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
          <span class="mdi mdi-menu"></span>
        </button>
      </div>
    </nav>
    <div class="container-fluid page-body-wrapper">
      <nav class="sidebar sidebar-offcanvas" id="sidebar">
        <ul class="nav">
          <li class="nav-item nav-profile">
            <a href="#" class="nav-link">
              <div class="nav-profile-image">
                <img src="images/faces/face1.jpg" alt="profile">
                <span class="login-status online"></span> <!--change to offline or busy as needed-->              
              </div>
              <div class="nav-profile-text d-flex flex-column">
                <span class="font-weight-bold mb-2">${sessionScope.loginBussiness.bussinessName }</span>    <!-- 用户名 -->
                <span class="text-secondary text-small">${sessionScope.loginBussiness.bussinessPhone }</span>    <!-- 电话 -->
              </div>
              <i class="mdi mdi-bookmark-check text-success nav-profile-badge"></i>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="bussiness/selectBussiness">   <!-- 地址 -->
              <span class="menu-title">个人信息</span>
              <i class="mdi mdi-format-list-bulleted menu-icon"></i>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="bussiness/selectCommodityByName">     <!-- 地址 -->
              <span class="menu-title">商品信息</span>
              <i class="mdi mdi-table-large menu-icon"></i>
            </a>
          </li>
           <li class="nav-item">
            <a class="nav-link" href="bussiness/selectOrder">     <!-- 地址 -->
              <span class="menu-title">订单信息</span>
               <i class="mdi mdi-crosshairs-gps menu-icon"></i>
            </a>
          </li>
        </ul>
      </nav>
      <!-- partial -->
      <div class="main-panel">        
        <div class="content-wrapper">
          <div class="page-header">
            <h3 class="page-title">
              	商品信息
            </h3>
          </div>
          <div class="row">
            <div class="col-12 grid-margin stretch-card">
              <div class="card">
                <div class="card-body">
                  <h4 class="card-title">基本信息</h4>
                  <form class="forms-sample" action="bussiness/addCommodity" method="post" enctype="multipart/form-data">
                    <div class="form-group row">
                      <label for="exampleInputUsername2" class="col-sm-3 col-form-label">商品名称</label>
                      <div class="col-sm-9">
                        <input type="text" class="form-control" id="foodName" placeholder="商品名称" name="foodName" >
                      </div>
                    </div>
                    <div class="form-group row">
                      <label class="col-sm-3 control-label">商品图片</label>
                            <div class="ibox-content">
                                <input type="file" name="foodPicture" id="foodPicture">
                            </div>
                    </div>
                    <div class="form-group row">
                      <label for="exampleInputMobile" class="col-sm-3 col-form-label">商户种类</label>
                      <div class="col-sm-9">
						<select class="form-control" id="typeId" name="typeId">
								<option>请选择</option>
                          <c:forEach var="type" items="${type}">
                          		<option value="${type.typeId}">${type.typeName}</option>
							</c:forEach>
                        </select>
                      </div>
                    </div>
                    <div class="form-group row">
                      <label for="exampleInputConfirmPassword2" class="col-sm-3 col-form-label">商品单价(￥)</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" id="foodPrice" placeholder="商品单价" name="foodPrice" >
                      </div>
                    </div>
                    <div class="form-group row">
                      <label for="exampleInputConfirmPassword2" class="col-sm-3 col-form-label">商品简介</label>
                      <div class="col-sm-9">
                        <textarea rows="10px" cols="400px"  class="form-control" id="foodBrief" placeholder="商品简介" name="foodBrief"></textarea>
                      </div>
                    </div>
                    
                    <button type="submit" class="btn btn-gradient-primary mr-2">Submit</button>
                  </form>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script src="vendors/js/vendor.bundle.addons.js"></script>
  <script src="js/off-canvas.js"></script>
  <script src="js/misc.js"></script>
  <script src="js/file-upload.js"></script>
</body>

</html>